<style>
.goodsadvconfig .descconfig div {
	float:left;
	width:33%;
	text-align:center;
}
.goodsadvconfig .input_style {
	width:90%;
}
</style>
<div id="cat-config" style="display:none;"></div>
<div class="tableform widgetconfig">
  <div class="division" id="showList" style="display:none;"> <{t app='b2c'}>标签数:<{/t}>
    <select name="columNum" onChange="columsNum()" id="columNum">
      <option value=1 <{if $setting.columNum==1}>selected<{/if}> >1
      </option>
      <option value=2 <{if $setting.columNum==2}>selected<{/if}>>2
      </option>
      <option value=3 <{if $setting.columNum==3}>selected<{/if}>>3
      </option>
      <option value=4 <{if $setting.columNum==4}>selected<{/if}>>4
      </option>
      <option value=5 <{if $setting.columNum==5}>selected<{/if}>>5
      </option>
    </select>
    <{t app='b2c'}>切换标签方式：<{/t}>
    <select name="changeEffect"  id="changeEffect">
      <option value=1 <{if $setting.changeEffect==1}>selected<{/if}>><{t app='b2c'}>点击<{/t}>
      </option>
      <option value=2 <{if $setting.changeEffect==3}>selected<{/if}>><{t app='b2c'}>滑动<{/t}>
      </option>
    </select>
  </div>
  <h4><{t app='b2c'}>商品显示范围<{/t}></h4>
  <div class="division" id="listArea1" name="listArea1"> <{t app='b2c'}>默认停留:<{/t}><input type="radio" name="onSelect" value=0 <{if $setting.onSelect== 0}>checked<{/if}>>
    <{t app='b2c'}>列表说明：<{/t}><{input name="explain[0]" value=$setting.explain[0]}>
    <{assign var=filter1 value=$setting.adjunct.items.0}>
    <{input type="goodsfilter" app=b2c name="filter1" value=array('items'=>$filter1)}> </div>
  <div class="division" id="listArea2" style="display:none">
    <h4><{t app='b2c'}>商品显示范围<{/t}></h4>
    <{t app='b2c'}> 默认停留:<{/t}><input type="radio" name="onSelect" value=1 <{if $setting.onSelect== 1}>checked<{/if}>>
    <{t app='b2c'}>列表说明：<{/t}><{input name="explain[1]" value=$setting.explain[1]}>
    <{assign var=filter2 value=$setting.adjunct.items.1}>
    <{input type="goodsfilter" app=b2c name="filter2" value=array('items'=>$filter2)}> </div>
  <div class="division" id="listArea3" style="display:none">
    <h4><{t app='b2c'}>商品显示范围<{/t}></h4>
    <{t app='b2c'}>默认停留:<{/t}><input type="radio" name="onSelect" value=2 <{if $setting.onSelect== 2}>checked<{/if}>>
    <{t app='b2c'}>列表说明：<{/t}><{input name="explain[2]" value=$setting.explain[2]}>
    <{assign var=filter3 value=$setting.adjunct.items.2}>
    <{input type="goodsfilter" app=b2c name="filter3" value=array('items'=>$filter3)}> </div>
  <div class="division" id="listArea4" style="display:none">
    <h4><{t app='b2c'}>商品显示范围<{/t}></h4>
    <{t app='b2c'}>默认停留:<{/t}><input type="radio" name="onSelect" value=3 <{if $setting.onSelect== 3}>checked<{/if}>>
    <{t app='b2c'}>列表说明：<{/t}><{input name="explain[3]" value=$setting.explain[3]}>

    <{assign var=filter4 value=$setting.adjunct.items.3}>
    <{input type="goodsfilter" app=b2c name="filter4" value=array('items'=>$filter4)}> </div>
  <div class="division" id="listArea5" style="display:none">
    <h4><{t app='b2c'}>商品显示范围<{/t}></h4>
    <{t app='b2c'}>默认停留:<{/t}><input type="radio" name="onSelect" value=4 <{if $setting.onSelect== 4}>checked<{/if}>>
    <{t app='b2c'}>列表说明：<{/t}><{input name="explain[4]" value=$setting.explain[4]}>

    <{assign var=filter5 value=$setting.adjunct.items.4}>
    <{input type="goodsfilter" app=b2c name="filter5" value=array('items'=>$filter5)}> </div>
  <div class="division">
    <table width="100%" cellpadding="0" cellspacing="0">
      <tr>
        <th><{t app='b2c'}>列数：<{/t}></th>
        <td><{input name="column" value=$setting.column|default:'4' required="true"
          type="digits"}></td>
      </tr>
      <tr>
        <th><{t app='b2c'}>商品数：<{/t}></th>
        <td><{input name="limit" value=$setting.limit|default:'4' required="true"
          type="digits"}></td>
      </tr>
      <tr>
        <th><{t app='b2c'}>排序设定：<{/t}></th>
        <td><select name="goods_orderby">
            <{foreach from=$data item=orderby key=key}> <option value="<{$key}>" <{if $setting.goods_orderby==$key}>selected<{/if}>><{$orderby.label}>
            </option>
            <{/foreach}>
          </select></td>
      </tr>
      <tr>
        <th><{t app='b2c'}>是否显示更多：<{/t}></th>
        <td><input type="radio" name="showMore" value="on" <{if $setting.showMore!="off"}>checked="checked"<{/if}>
          ><{t app='b2c'}>是<{/t}> <input type="radio" name="showMore" value="off" <{if $setting.showMore=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}> </td>
      </tr>
      <tr id="showGoodsPicArea">
        <th>显示商品图片：</th>
        <td><input type="radio" name="showGoodsImg" id="showGoodsImg" value="on" <{if
          $setting.showGoodsImg!="off"}>checked="checked"<{/if}> ><{t app='b2c'}>是<{/t}> <input type="radio" name="showGoodsImg" value="off" <{if
          $setting.showGoodsImg=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}> </td>
      </tr>
      <tr >
        <th><{t app='b2c'}>商品名最长显示长度：<{/t}></th>
        <td><{input name="max_length" value=$setting.max_length|default:'35'}></td>
      </tr>
    </table>
  </div>
  <div class="division" id="showGoodsImg-view" <{if $setting.showGoodsImg=="off"}>style="display:none"<{/if}>>
  <h4><{t app='b2c'}>商品图片设置<{/t}></h4>
  <table width="100%" cellpadding="0" cellspacing="0">
    <tr>
      <th><{t app='b2c'}>图片位置：<{/t}></th>
      <td><select name="goodsImgPosition">
          <option value="top" <{if $setting.goodsImgPosition=="top"}>selected="selected"<{/if}>><{t app='b2c'}>上方<{/t}>
          </option>
          <option value="left" <{if $setting.goodsImgPosition=="left"}>selected="selected"<{/if}>><{t app='b2c'}>左侧<{/t}>
          </option>
          <option value="center" <{if $setting.goodsImgPosition=="center"}>selected="selected"<{/if}>><{t app='b2c'}>中间<{/t}>
          </option>
          <option value="right" <{if $setting.goodsImgPosition=="right"}>selected="selected"<{/if}>><{t app='b2c'}>右侧<{/t}>
          </option>
          <option value="bottom" <{if $setting.goodsImgPosition=="bottom"}>selected="selected"<{/if}>><{t app='b2c'}>下方<{/t}>
          </option>
        </select></td>
    </tr>
  </table>
</div>
<div class="division">
  <table width="100%" cellpadding="0" cellspacing="0">
    <tr id="showGoodsNameArea">
      <th><{t app='b2c'}>显示商品名：<{/t}></th>
      <td><input type="radio" name="showGoodsName" value="on" <{if $setting.showGoodsName!="off"}>checked="checked"<{/if}>><{t app='b2c'}>是<{/t}> <input type="radio" name="showGoodsName" value="off" <{if $setting.showGoodsName=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}> </td>
    </tr>
    <tr>
      <th><{t app='b2c'}>显示商品描述(包括价格、简介等)：<{/t}></th>
      <td><input type="radio" name="showGoodsDesc" value="on" <{if $setting.showGoodsDesc!="off"}>checked="checked"<{/if}>><{t app='b2c'}>是<{/t}> <input type="radio" name="showGoodsDesc" value="off" <{if $setting.showGoodsDesc=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}> </td>
    </tr>
  </table>
</div>
<div class="division"> <span id="btn-adv-config" class="lnk"><{t app='b2c'}>更多设置<{/t}>&gt;&gt;</span>
	<{input type='hidden' id='showmorebtn' name='showmorebtn' value=$setting.showmorebtn|default:0}>
  <div id="adv-config" <{if $setting.showmorebtn!=1}>style="display:none;"<{/if}>>
   <div class="division" id="showGoodsDesc-view" <{if $setting.showGoodsDesc=="off"}>style="display:none"<{/if}>>
    <h4><{t app='b2c'}>商品描述设置<{/t}></h4>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="goodsadvconfig">

      <tr>
        <th><{t app='b2c'}>市场价：<{/t}></th>
        <td class="descconfig">
          <input type="radio" name="showGoodsMktPrice" value="on" <{if $setting.showGoodsMktPrice!="off"}>checked="checked"<{/if}>><{t app='b2c'}>是 <{/t}> <input type="radio" name="showGoodsMktPrice" value="off" <{if $setting.showGoodsMktPrice=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}>
          <table width="100%" border="0" cellspacing="0" cellpadding="0" id="showGoodsMktPrice-view" <{if $setting.showGoodsMktPrice!='on'}>style="display:none"<{/if}>>
           <tr>
              <{assign var=arg1 value=$___b2c="市场价:"|t:'b2c'}>
              <td><input name="mktPriceText" class="input_style" value="<{$setting.mktPriceText|default:$arg1}>"></td>
              <td><input name="mktPriceSep" class="input_style" value="<{$setting.mktPriceSep|default:''}>"></td>
           </tr>
           <tr>
              <td><{t app='b2c'}>字体设置：<{/t}>
              <{input type="color" name="color1" value=$setting.color1|default:'default' }>&nbsp;
              <select type="fontset" value="1" name="mark_font" class="x-input-select inputstyle">
                <{if !$setting.mark_font}>
	                <option value="0" selected="selected"></option>
	                <option value="bold">粗体</option>
	                <option value="italic">斜体</option>
	                <option value="line-through">中线</option>
                <{elseif $setting.mark_font == "bold"}>
	                <option value="0"></option>
	                <option value="bold" selected="selected">粗体</option>
	                <option value="italic">斜体</option>
	                <option value="line-through">中线</option>
                <{elseif $setting.mark_font == "italic"}>
                    <option value="0"></option>
                    <option value="bold">粗体</option>
                    <option value="italic" selected="selected">斜体</option>
                    <option value="line-through">中线</option>
                <{elseif $setting.mark_font == "line-through"}>
                    <option value="0"></option>
                    <option value="bold">粗体</option>
                    <option value="italic">斜体</option>
                    <option value="line-through" selected="selected">中线</option>
                <{/if}>
              </select>
              </td>
              <td></td>
           </tr>
          </table>
        </td>
      </tr>
    <tr>
      <th><{t app='b2c'}>销售价：<{/t}></th>
      <td class="descconfig">
      <input type="radio" name="showGoodsPrice" value="on" <{if $setting.showGoodsPrice!="off"}>checked="checked"<{/if}>><{t app='b2c'}>是 <{/t}> <input type="radio" name="showGoodsPrice" value="off" <{if $setting.showGoodsPrice=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}>
       <table width="100%" cellspacing="0" cellpadding="0" id="showGoodsPrice-view" <{if $setting.showGoodsPrice=="off"}>style="display:none"<{/if}>>
        <tr> <{assign var=arg2 value=$___b2c='销售价:'|t:'b2c'}>
          <td><input name="priceText" class="input_style" value="<{$setting.priceText|default:$arg2}>"></td>
          <td><input name="priceSep" class="input_style" value="<{$setting.priceSep|default:''}>"></td>
       </tr>
       <tr>
          <td><{t app='b2c'}>字体设置：<{/t}><{input type="color" name="color2" value=$setting.color2|default:'default'}>&nbsp;
              <select type="fontset" value="1" name="member_font" class="x-input-select inputstyle">
                <{if !$setting.member_font}>
                    <option value="0" selected="selected"></option>
                    <option value="bold">粗体</option>
                    <option value="italic">斜体</option>
                    <option value="line-through">中线</option>
                <{elseif $setting.member_font == "bold"}>
                    <option value="0"></option>
                    <option value="bold" selected="selected">粗体</option>
                    <option value="italic">斜体</option>
                    <option value="line-through">中线</option>
                <{elseif $setting.member_font == "italic"}>
                    <option value="0"></option>
                    <option value="bold">粗体</option>
                    <option value="italic" selected="selected">斜体</option>
                    <option value="line-through">中线</option>
                <{elseif $setting.member_font == "line-through"}>
                    <option value="0"></option>
                    <option value="bold">粗体</option>
                    <option value="italic">斜体</option>
                    <option value="line-through" selected="selected">中线</option>
                <{/if}>
              </select>
              <!--
          <{input name="member_font" type="fontset" value=$setting.member_font|default:'0'}>
           -->
          </td>
       </tr>
       </table>
      </td>
    </tr>
        <tr>
      <th><{t app='b2c'}>会员价：<{/t}></th>
      <td class="descconfig">
      <input type="radio" name="showMemberPrice" value="on" <{if $setting.showMemberPrice!="off"}>checked="checked"<{/if}>><{t app='b2c'}>是 <{/t}> <input type="radio" name="showMemberPrice" value="off" <{if $setting.showMemberPrice=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}>
       <table width="100%" cellspacing="0" cellpadding="0" id="showMemberPrice-view" <{if $setting.showMemberPrice=="off"}>style="display:none"<{/if}>>
        <tr> <{assign var=arg2 value=$___b2c='会员价:'|t:'b2c'}>
          <td><input name="mempriceText" class="input_style" value="<{$setting.mempriceText|default:$arg2}>"></td>
          <td><input name="mempriceSep" class="input_style" value="<{$setting.mempriceSep|default:''}>"></td>
       </tr>
       <tr>
          <td><{t app='b2c'}>字体设置：<{/t}><{input type="color" name="color4" value=$setting.color4|default:'default'}>&nbsp;
              <select type="fontset" value="1" name="smember_font" class="x-input-select inputstyle">
                <{if !$setting.smember_font}>
                    <option value="0" selected="selected"></option>
                    <option value="bold">粗体</option>
                    <option value="italic">斜体</option>
                    <option value="line-through">中线</option>
                <{elseif $setting.smember_font == "bold"}>
                    <option value="0"></option>
                    <option value="bold" selected="selected">粗体</option>
                    <option value="italic">斜体</option>
                    <option value="line-through">中线</option>
                <{elseif $setting.smember_font == "italic"}>
                    <option value="0"></option>
                    <option value="bold">粗体</option>
                    <option value="italic" selected="selected">斜体</option>
                    <option value="line-through">中线</option>
                <{elseif $setting.smember_font == "line-through"}>
                    <option value="0"></option>
                    <option value="bold">粗体</option>
                    <option value="italic">斜体</option>
                    <option value="line-through" selected="selected">中线</option>
                <{/if}>
              </select>
              <!--
          <{input name="member_font" type="fontset" value=$setting.member_font|default:'0'}>
           -->
          </td>
       </tr>
       </table>
      </td>
    </tr>
    <tr>
      <th><{t app='b2c'}>节省：<{/t}></th>
      <td class="descconfig"><input type="radio" name="showGoodsSave" value="on" <{if $setting.showGoodsSave!="off"}>checked="checked"<{/if}>><{t app='b2c'}>是<{/t}> <input type="radio" name="showGoodsSave" value="off" <{if $setting.showGoodsSave=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}>
        <table width="100%" cellspacing="0" cellpadding="0" id="showGoodsSave-view" <{if $setting.showGoodsSave=="off"}>style="display:none"<{/if}>>

    <tr> <{assign var=arg3 value=$___b2c='节省:'|t:'b2c'}>
      <td><input name="saveText" class="input_style" value="<{$setting.saveText|default:$arg3}>"></td>
      <td><input name="saveSep" class="input_style" value="<{$setting.saveSep|default:''}>"></td>
    </tr>
    <tr>
      <td><{t app='b2c'}>字体设置：<{/t}><{input type="color" name="color3" value=$setting.color3|default:'default'}>&nbsp;
          <select type="fontset" value="1" name="save_font" class="x-input-select inputstyle">
            <{if !$setting.save_font}>
                <option value="0" selected="selected"></option>
                <option value="bold">粗体</option>
                <option value="italic">斜体</option>
                <option value="line-through">中线</option>
            <{elseif $setting.save_font == "bold"}>
                <option value="0"></option>
                <option value="bold" selected="selected">粗体</option>
                <option value="italic">斜体</option>
                <option value="line-through">中线</option>
            <{elseif $setting.save_font == "italic"}>
                <option value="0"></option>
                <option value="bold">粗体</option>
                <option value="italic" selected="selected">斜体</option>
                <option value="line-through">中线</option>
            <{elseif $setting.save_font == "line-through"}>
                <option value="0"></option>
                <option value="bold">粗体</option>
                <option value="italic">斜体</option>
                <option value="line-through" selected="selected">中线</option>
            <{/if}>
          </select>
          <!--
      <{input name="save_font" type="fontset" value=$setting.save_font|default:'0'}>
      -->
      </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
      <th><{t app='b2c'}>折扣：<{/t}></th>
      <td class="descconfig"><input type="radio" name="showCount" value="on" <{if $setting.showCount!="off"}>checked="checked"<{/if}>><{t app='b2c'}>是<{/t}> <input type="radio" name="showCount" value="off" <{if $setting.showCount=="off"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}>
        <table width="100%" cellspacing="0" cellpadding="0" id="showCount-view" <{if $setting.showCount=="off"}>style="display:none"<{/if}>>

    <tr> <{assign var=arg4 value=$___b2c='折扣:'|t:'b2c'}>
      <td><input name="countText" class="input_style" value="<{$setting.countText|default:$arg4}>"></td>
      <td><input name="countSep" class="input_style" value="<{$setting.countSep|default:'%'}>"></td>
    </tr>
    <tr>
      <td><{t app='b2c'}>字体设置：<{/t}><{input type="color" name="color5" value=$setting.color5|default:'default'}>&nbsp;
        <select type="fontset" value="1" name="count_font" class="x-input-select inputstyle">
          <{if !$setting.count_font}>
              <option value="0" selected="selected"></option>
              <option value="bold">粗体</option>
              <option value="italic">斜体</option>
              <option value="line-through">中线</option>
          <{elseif $setting.count_font == "bold"}>
              <option value="0"></option>
              <option value="bold" selected="selected">粗体</option>
              <option value="italic">斜体</option>
              <option value="line-through">中线</option>
          <{elseif $setting.count_font == "italic"}>
              <option value="0"></option>
              <option value="bold">粗体</option>
              <option value="italic" selected="selected">斜体</option>
              <option value="line-through">中线</option>
          <{elseif $setting.count_font == "line-through"}>
              <option value="0"></option>
              <option value="bold">粗体</option>
              <option value="italic">斜体</option>
              <option value="line-through" selected="selected">中线</option>
          <{/if}>
        </select>
        <!--
      <{input name="count_font" type="fontset" value=$setting.count_font|default:'0'}>
      -->
      </td>
    </tr>
    </table>
    </td>
    </tr>
   <!--   <tr>
      <th><{t app='b2c'}>显示购买区：<{/t}></th>
      <td class="descconfig"><input type="radio" name="showBuyArea" value="on" <{if $setting.showBuyArea=="on"}>checked="checked"<{/if}>><{t app='b2c'}>是<{/t}> <input type="radio" name="showBuyArea" value="off" <{if $setting.showBuyArea!="on"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}>
        </span></td>
    </tr> -->
    </table>
  <table width="100%" cellpadding="0" cellspacing="0">
    <tr>
      <th width="130"><{t app='b2c'}>商品图片宽：<{/t}></th>
      <td><{input name="goodsImgWidth" value=$setting.goodsImgWidth type="digits"}></td>
    </tr>
    <tr>
      <th><{t app='b2c'}>商品图片高：<{/t}></th>
      <td><{input name="goodsImgHeight" value=$setting.goodsImgHeight type="digits"}></td>
    </tr>
    <tr >
      <th><{t app='b2c'}>图片设定：<{/t}></th>
      <td><input type="radio" name="restrict" value="off" <{if $setting.restrict=="off"}>checked="checked"<{/if}>
        ><{t app='b2c'}>强制大小<{/t}> <input type="radio" name="restrict" value="on" <{if $setting.restrict!="off"}>checked="checked"<{/if}>><{t app='b2c'}>超出截断<{/t}> </td>
    </tr>
  </table>
  <table width="100%" cellpadding="0" cellspacing="0" id="showTypePic">
    <tr>
      <th><{t app='b2c'}>显示分类图片：<{/t}></th>
      <td><input type="radio" name="showTitleImg" id="showTitleImg" value="on" <{if $setting.showTitleImg=="on"}>checked="checked"<{/if}>><{t app='b2c'}>是<{/t}> <input type="radio" name="showTitleImg" value="off" <{if $setting.showTitleImg!="on"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}> </td>
    </tr>
  </table>
  <table width="100%" cellpadding="0" cellspacing="0" id="showGoodsInfo">
    <tr>
      <th><{t app='b2c'}>显示商品简介：<{/t}></th>
      <td><input type="radio" name="showGoodsInfo" id="showGoodsInfo" value="on" <{if $setting.showGoodsInfo=="on"}>checked="checked"<{/if}>><{t app='b2c'}>是<{/t}> <input type="radio" name="showGoodsInfo" value="off" <{if $setting.showGoodsInfo!="on"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}> </td>
    </tr>
  </table>
  <div id="showTitleImg-view" <{if $setting.showTitleImg!="on"}>style="display:none"<{/if}>>
  <h4><{t app='b2c'}>分类图片设置<{/t}></h4>
  <table width="100%" cellpadding="0" cellspacing="0">
    <tr>
      <th><{t app='b2c'}>图片地址：<{/t}></th>
      <td><{input name="titleImgSrc" value=$setting.titleImgSrc}> </td>
    </tr>
    <tr>
      <th><{t app='b2c'}>图片链接：<{/t}></th>
      <td><{input name="titleImgHref" value=$setting.titleImgHref}> </td>
    </tr>
    <tr>
      <th><{t app='b2c'}>图片位置：<{/t}></th>
      <td><select name="titleImgPosition">
          <option value="top" <{if $setting.titleImgPosition=="top"}>selected="selected"<{/if}>><{t app='b2c'}>上方<{/t}>
          </option>
          <option value="left" <{if $setting.titleImgPosition=="left"}>selected="selected"<{/if}>><{t app='b2c'}>左侧<{/t}>
          </option>
          <option value="center" <{if $setting.titleImgPosition=="center"}>selected="selected"<{/if}>><{t app='b2c'}>中间<{/t}>
          </option>
          <option value="right" <{if $setting.titleImgPosition=="right"}>selected="selected"<{/if}>><{t app='b2c'}>右侧<{/t}>
          </option>
          <option value="bottom" <{if $setting.titleImgPosition=="bottom"}>selected="selected"<{/if}>><{t app='b2c'}>下方<{/t}>
          </option>
        </select></td>
    </tr>
    <tr>
      <th><{t app='b2c'}>图片描述：<{/t}></th>
      <td><{input name="titleImgAlt" value=$setting.titleImgAlt}> </td>
    </tr>
  </table>
</div>
<table width="100%" cellpadding="0" cellspacing="0" id="showTypeDescript">
  <tr>
    <th><{t app='b2c'}>显示分类描述：<{/t}></th>
    <td><input type="radio" name="showTitle" value="on" <{if $setting.showTitle=="on"}>checked="checked"<{/if}>><{t app='b2c'}>是 <{/t}> <input type="radio" name="showTitle" value="off" <{if $setting.showTitle!="on"}>checked="checked"<{/if}>><{t app='b2c'}>否<{/t}></td>
  </tr>
    <tr id="showTitle-view"
  <{if $setting.showTitle!="on"}>style="display:none"<{/if}>>

    <th><{t app='b2c'}>分类描述：<{/t}></th>
    <td><{input name="titleDesc" value=$setting.titleDesc}></td>
  </tr>
</table>
</div>
</div>
</div>
</div>
<script>

function columsNum(){
  for(i=1;i<=5;i++){
    if(i<=$('columNum').value){
      $('listArea'+i).set('styles',{display:""});
    }else{
      $('listArea'+i).set('styles',{display:"none"});
    }
  }

}

function doCheck(){

    if($('showGoodsImg').checked==true){
      $('showGoodsImg-view').style.display="";
    }
    if($('showTitleImg').checked==true){
      $('showTitleImg-view').style.display="";
    }

}
function setToggler(togglers){
  togglers.each(function(toggler){
    var view = toggler.getProperty('name')+'-view';
    toggler.addEvent('click',function(){
      if(this.value=="on"){
        $(view).show();
      }else{
        $(view).hide();
      }
    });
  });
}

var togglers = $$('input[name="showGoodsImg"]','input[name="showGoodsDesc"]','input[name="showTitleImg"]','input[name="showTitle"]','input[name="showGoodsMktPrice"]','input[name="showGoodsPrice"]','input[name="showMemberPrice"]','input[name="showGoodsSave"]','input[name="showCount"]');
setToggler(togglers);

$('btn-adv-config').addEvent('click',function(){
  if(this.hasClass('show')){
    this.removeClass('show');
    $('adv-config').hide();
	$('showmorebtn').set('value',0);
  }else{
    this.addClass('show');
    $('adv-config').show();
	$('showmorebtn').set('value',1);
  }
});
columsNum();

function getCfgForm(id){
  var config = $(id);
  while(config.tagName != 'FORM'){
    config = config.getParent();
  }
  return config;
}

function onRest(){
  $('columNum').selectedIndex=0;
  $('listArea1').style.display="none";
  //$('showList').style.display="none";
  columsNum();
}



function setCfgView(view){
  switch(view){
    case 'default.html':
      onRest();
      $('showTypePic').style.display="";
      $('showTypeDescript').style.display="";
      $('showGoodsNameArea').style.display="";
      $('showGoodsPicArea').style.display="";
      doCheck();
    break;
    case 'morediv.html':
    case 'morediv2.html':
      $('showList').style.display="";
      $('showList').style.display="";
      $('listArea1').style.display="";
      $('showTypePic').style.display="none";
      $('showTypeDescript').style.display="none";
      $('showGoodsNameArea').style.display="none";
      $('showGoodsPicArea').style.display="none";
      $('showGoodsImg-view').style.display="none";
      $('showTitleImg-view').style.display="none";
    break;
    case 'list2.html':
      onRest();
      $('showTypePic').style.display="none";
      $('showTypeDescript').style.display="none";
      $('showGoodsNameArea').style.display="none";
      $('showGoodsPicArea').style.display="none";
      $('showGoodsImg-view').style.display="none";
      $('showTitleImg-view').style.display="none";
    break;
  }
}

function getWgtTpl(){
  var sels = getCfgForm('cat-config').getElements('select');
  var wgtTpl = '';
  sels.each(function(sel){
    if(sel.getProperty('name') == '__wg[tpl]') wgtTpl = sel;
  });
  return wgtTpl;
}



var catTpl = getWgtTpl();
setCfgView(catTpl.value);

catTpl.addEvent('change',function(){
  setCfgView(this.value);
});

</script>
